import { get } from 'lodash'

export const title: string = 'Visual-Dooring'

export const canvasWidth: number = 5000

export const canvasHeight: number = 3000

export const isDev = process.env.NODE_ENV === 'development'

// export const SERVER_URL = 'http://192.168.31.195:3000'
// export const SERVER_URL = 'http://192.168.1.11:3000'
export const SERVER_URL = isDev ? 'http://192.168.31.105:3000' : (window.location.protocol + '//' + window.location.host);
// export const SERVER_URL = 'http://192.168.31.88:3000'
// export const SERVER_URL = 'http://172.25.129.172:3000'
// export const SERVER_URL = 'http://192.168.56.1:3000'

export const IP_URL = 'https://beian.miit.gov.cn/'

// export const IP_ADDRESS = '鄂ICP备18024675号-2'
export const IP_ADDRESS = 'V6.Dooring'

export const imgLoadFail = ''

export const getImageUrl: (info: any) => string = info => {
  const imageUrl = get(info, 'file.response.result.url', '')
  return imageUrl
}
